#pragma once
#include"CP3.h"
#include"CFacet.h"
#include"CP2.h"
#include"CProjection.h"
#include "CVector.h"
#include "CPoint2.h"
#include "Triangle.h"
#include "CLighting.h"
#include "CMaterial.h"
#include "CT3.h"
#include "CTexture.h"
#include "plane.h"
#define ROUND(d)  int(d+0.5)
class Seal
{
public:
	Seal(void);
	virtual ~Seal(void);
	void ReadPoint(void);
	void ReadFacet(void);
	void ReadTexture(CTexture* texture);
	void DrawShadow(CDC* pDC);
	void Draw(CDC* pDC);
	void Draw2(CDC* pDC);
	void Draw3(CDC* pDC);
	void Gouraud(CDC* pDC);
	void GouraudXin(CDC* pDC);

	void Phong(CDC* pDC);
	void DrawTexture(CDC* pDC);
	void DrawTexture3D(CDC* pDC);
	void DrawXin(CDC* pDC);
	void SetScene(CLighting* pLight, CMaterial* pMaterial, CTexture* pTexture);
	void SetScene(CLighting* pLight, CMaterial* pMaterial);
	void SetX(int x);
	CP3 Intersect(CP3 p0,CP3 p1);

	CP3* GetVertexArrayName(void);
public:
	CProjection projection;
	CProjection SlideProjector;
private:
	CP3 P[24];
	CFacet F[26];
	CP3 quardrP[4];
	CLighting* pLight;
	CMaterial* pMaterial;
	//CTexture Texture[26];
	CTexture* pTexture;
	CTexture* pSealTexture;
	CPlane plane;
	int x=2;
};

